<template>
    <div class="box">
        <span>{{ num }}</span>
        <button @click="sum">+</button>
    </div>
</template>

<script>
export default {
    data() {
        return {
            num: 0,
        }
    },
    methods: {
        sum() {
            this.num++
        }
    }
}
</script>

<style>
.box {
    display: flex;
    height: 100vh;
    justify-content: center;
    align-items: center;
}
</style>